using System;
using System.Drawing;
using System.Collections;
using System.Xml.Serialization;

namespace Camalon.ColorPicker
{
	/// <summary>
	/// Summary description for ColorSerializer.
	/// </summary>
	[Serializable]
	internal struct ColorItem
	{
		[XmlAttribute]
		public string Name;
		public int A;
		public int R;
		public int G;
		public int B;

		
		public ColorItem(Color argbColor, string name )
		{
			A = argbColor.A;
			R = argbColor.R;
			G = argbColor.G;
			B = argbColor.B;
			Name = name; 
		}


		[XmlIgnore]
		public Color Color
		{
			get
			{
				return Color.FromArgb( A,R,G,B); 
			}
		}

		[XmlIgnore]
		public Color ColorRGB
		{
			get
			{
				return Color.FromArgb( R,G,B); 
			}
			set
			{
				R = value.R;
				G = value.G;
				B = value.B;
			}
		}
		


	}




}
